import request from '@/utils/request'

const PATH = '/sys/dep'

export function findDepartmentREQ(params) {
  return request({
    url: PATH,
    method: 'get',
    params
  })
}

export function createDepartmentREQ(params) {
  return request({
    url: PATH,
    method: 'post',
    params
  })
}
export function getDepartmentByIdREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'GET'
  })
}

export function updateDepartmentREQ(params) {
  return request({
    url: PATH,
    method: 'put',
    params
  })
}

export function deleteDepartmentREQ(id) {
  return request({
    url: `${PATH}/${id}`,
    method: 'delete'
  })
}

export function findTreeREQ(id) {
  return request({
    url: `${PATH}/tree`,
    method: 'GET'
  })
}

